/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.team.app.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;

/**
 *
 * @author donnv
 */
@Entity
@Table(name = "auth", catalog = "", schema = "")
public class Auth implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Column(name = "account_id")
    private Long accountId;
    @Size(max = 50)
    @Column(name = "account_name", length = 50)
    private String accountName;
    @Size(max = 50)
    @Column(name = "approve_by", length = 50)
    private String approveBy;
    @Column(name = "approve_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date approveDate;
    @Column(name = "company_id")
    private Long companyId;
    @Column(name = "group_id")
    private Long groupId;
    @Column(name = "object_type")
    private Long objectType;
    @Size(max = 100)
    @Column(name = "password", length = 100)
    private String password;
    @Column(name = "role_id")
    private Long roleId;
    @Column(name = "active")
    private Long active;
    @Column(name = "is_status")
    private Long isStatus;
    @Column(name = "parent_id")
    private Long parentId;

    public Auth() {
    }

    public Auth(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getApproveBy() {
        return approveBy;
    }

    public void setApproveBy(String approveBy) {
        this.approveBy = approveBy;
    }

    public Date getApproveDate() {
        return approveDate;
    }

    public void setApproveDate(Date approveDate) {
        this.approveDate = approveDate;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getObjectType() {
        return objectType;
    }

    public void setObjectType(Long objectType) {
        this.objectType = objectType;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getActive() {
        return active;
    }

    public void setActive(Long active) {
        this.active = active;
    }

    public Long getIsStatus() {
        return isStatus;
    }

    public void setIsStatus(Long isStatus) {
        this.isStatus = isStatus;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Auth)) {
            return false;
        }
        Auth other = (Auth) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.team.app.model.Auth[ id=" + id + " ]";
    }
    
}
